package com.kexuexiong.demo.bearBaseService.controller.index;


import com.kexuexiong.demo.common.dto.Result;
import com.kexuexiong.demo.common.feignProvider.baseService.index.IndexFeignClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = {"首页"})
@RestController
@RequestMapping("/index")
@Slf4j
public class IndexController implements IndexFeignClient {


    /**
     * 测试
     *
     * @param name
     * @return
     */
    @ApiImplicitParams({@ApiImplicitParam(name = "name", value = "没有")})
    @ApiOperation(value = "首页测试", notes = "首页测试")
    @RequestMapping(value = "/index", method = {RequestMethod.GET})
    @Override
    public Result<String> index(@RequestParam("name") String name) {
        log.info("index,name=>{}", name);
        return Result.success("i am bear base service "+name);
    }
}
